﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _05._02.ExtractDigits
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("Enter your string: ");
            int input = int.Parse(Console.ReadLine());

            string result = string.Empty;
            while (input != 0)
            {
                result =  input % 10 + result;
                input /= 10;
            }

            Console.WriteLine(result);
        }
    }
}
